package base.IO流;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class 解码和编码 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String str = "李云杉";
        byte[] bytes = str.getBytes("GBK");
        System.out.println(Arrays.toString(bytes));
        String str1 = new String(bytes,"GBK");
        System.out.println(str1);

    }
}
